<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
    <script rel="script" src="/js/nav.js"></script>
    <script rel="script" src="/js/inventoryAdd.js"></script>
    <link rel="stylesheet" href="/css/nav.css">
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
    <link href="/css/bootstrap.css" rel="stylesheet">
    <link href="/css/layui.css" rel="stylesheet">
    <link href="/css/public.css" rel="stylesheet">
    <link href="/css/null.css" rel="stylesheet">
    <script src="/js/bootstrap.min.js"></script>
    <link href="/css/search.css" rel="stylesheet">
</head>
<body>
<!--宠物商店管理系统页面-->
<nav class="navbar navbar-inverse">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">宠物商店管理系统</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <!--            <ul class="nav navbar-nav">-->
            <!--                <li class="active"><a href="#">书籍 <span class="sr-only">(current)</span></a></li>-->
            <!--                <li><a href="#">作者</a></li>-->
            <!--                <li class="dropdown">-->
            <!--                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">更多 <span class="caret"></span></a>-->
            <!--                    <ul class="dropdown-menu">-->
            <!--                        <li><a href="#">社区</a></li>-->
            <!--                        <li><a href="#">聊天室</a></li>-->
            <!--                        <li><a href="#">娱乐中心</a></li>-->
            <!--                        <li role="separator" class="divider"></li>-->
            <!--                        <li><a href="#">轻松一刻</a></li>-->
            <!--                        <li role="separator" class="divider"></li>-->
            <!--                        <li><a href="#">商务合作</a></li>-->
            <!--                    </ul>-->
            <!--                </li>-->
            <!--            </ul>-->
            <!--            <form class="navbar-form navbar-left">-->
            <!--                <div class="form-group">-->
            <!--                    <input type="text" class="form-control" placeholder="用户名">-->
            <!--                </div>-->
            <!--                <button type="submit" class="btn btn-default">login</button>-->
            <!--            </form>-->
            <ul class="nav navbar-nav navbar-right">
                <!--                <li><a href="#">godlover</a></li>-->
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">更多操作 <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="#">修改用户头像</a></li>
                        <li><a href="#">修改用户密码</a></li>
                        <li><a href="#">修改个人信息</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">注销</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
<div class="content">
    <div class="content-left">
        <!--分割线设置-->
        <div class="seg"></div>
        <!--菜单栏导航-->
        <div class="nav">
            <!--每一个菜单栏项-->
            <div class="nav-menu">
                <!--主标题-->
                <div class="nav-title">大类管理</div>
                <!--子标题-->
                <div class="nav-content" >
                    <a href="/ManageQueryAll">大类管理</a>
                </div>
            </div>
            +

            <!--每一个菜单栏项-->
            <div class="nav-menu">
                <!--主标题-->
                <div class="nav-title">小类管理</div>
                <!--子标题-->
                <div class="nav-content">
                    <a href="/product">小类管理</a>
                </div>
            </div>

            <!--每一个菜单栏项-->
            <div class="nav-menu">
                <!--主标题-->
                <div class="nav-title">商品管理</div>
                <!--子标题-->
                <div class="nav-content">
                    <a href="/displayItem">商品管理</a>
                </div>
            </div>

            <!--每一个菜单栏项-->
            <div class="nav-menu">
                <!--主标题-->
                <div class="nav-title">订单管理</div>
                <!--子标题-->
                <div class="nav-content">
                    <a href="/orderIndex">订单管理</a>
                </div>
            </div>

            <!--每一个菜单栏项-->
            <div class="nav-menu">
                <!--主标题-->
                <div class="nav-title">库存管理</div>
                <!--子标题-->
                <div class="nav-content">
                    <a href="/inventory">库存管理</a>
                </div>
            </div>

            <!--每一个菜单栏项-->
            <div class="nav-menu">
                <!--主标题-->
                <div class="nav-title">用户喜好管理</div>
                <!--子标题-->
                <div class="nav-content">
                    <a href="displayProfile">用户喜好管理</a>
                </div>
            </div>

            <!--每一个菜单栏项-->
            <div class="nav-menu">
                <!--主标题-->
                <div class="nav-title">供应商管理</div>
                <!--子标题-->
                <div class="nav-content">
                    <a href="displaySupplier">供应商管理</a>
                </div>
            </div>

            <!--每一个菜单栏项-->
            <div class="nav-menu">
                <!--主标题-->
                <div class="nav-title">用户管理</div>
                <!--子标题-->
                <div class="nav-content">
                    <a href="/UserManageIndex">用户管理</a>
                </div>
            </div>

            <!--每一个菜单栏项-->
            <div class="nav-menu">
                <!--主标题-->
                <div class="nav-title">管理员管理</div>
                <!--子标题-->
                <div class="nav-content">
                    <a href="/adminManageIndex">管理员管理</a>
                </div>
            </div>
        </div>
        <!--分割线设置-->
        <div class="seg"></div>
    </div>

    <div class="content-right">
        <div class="container" id="orign">
            <div class="row">
                <div class="col-md-10">
                    <div class="panel panel-primary">
                        <div class="panel-heading clearfix">
                            <nobr>
                                库存管理
<!--                                <h3 class="panel-title"  style="word-wrap: break-word" th:if="!${#strings.isEmpty(session.msg)}" th:text="${session.msg}">订单管理<span class="glyphicon glyphicon-leaf pull-right"><img src="/images/favicon.ico"/></span></h3>-->
                            </nobr>
                        </div>
                        <div class="panel-body">
                            <a href="#" class="btn btn-success" id="inventoryNew">新增</a>
                            <!--搜索模块 -->
                            <form class="form-inline pull-right" th:action="@{inventorySearch}">
                                <div class="form-group">
                                    <div class="input-group">
                                        <input type="text" class="form-control" id="keyword" name="keyword" placeholder="关键字">
                                    </div>
                                </div>
                                <button type="submit" class="btn btn-primary" name="inventorySearch" id="inventorySearch" value="Search">搜索</button>
                            </form>
                            <div id="productAutoComplete" class="productAutoComplete">
                                <ul id="productAutoList" class="productAutoList">
                                </ul>
                            </div>
                            <table class="table table-hover table-striped table-bordered" style="margin-top: 10px">
                                <thead>
                                <tr>
                                    <th>ItemId</th>
                                    <th>库存数量</th>
                                    <th class="text-center">操作</th>
                                </tr>
                                </thead>
                                <tbody>

                                <tr th:each="inventory:${inventoryList}">
                                    <td th:text="${inventory.getItemid()}">ItemId</td>
                                    <td th:text="${inventory.getQty()}">库存数量</td>
                                    <td class="text-center">
                                        <a class="btn btn-primary btn-sm inventoryEditBtn"  th:name="${inventory.getItemid()}">编辑</a>
                                        <a class="btn btn-danger btn-sm"  th:href="@{/inventoryDelete(itemid=${inventory.getItemid()})}" >删除</a>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <nav aria-label="Page navigation">
                                <ul class="pagination pull-right">
                                    <li>
                                        <a href="#" aria-label="Previous">
                                            <span aria-hidden="true">&laquo;</span>
                                        </a>
                                    </li>
                                    <li><a href="#">1</a></li>
                                    <li><a href="#">2</a></li>
                                    <li><a href="#">3</a></li>
                                    <li><a href="#">4</a></li>
                                    <li><a href="#">5</a></li>
                                    <li>
                                        <a href="#" aria-label="Next">
                                            <span aria-hidden="true">&raquo;</span>
                                        </a>
                                    </li>
                                </ul>
                            </nav>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--分割线-->
        <!--一开始要隐藏这个地方-->
        <form th:action="@{inventoryAdd}">
            <div class="layui-form layuimini-form" id="inventoryAdd">
                <div class="layui-form-item">
                    <label class="layui-form-label required">宠物编号</label>
                    <div class="layui-input-block">
                        <input type="text" name="itemid" lay-verify="required" lay-reqtext="ItemId不能为空" placeholder="请输入ItemId" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label required">库存数量</label>
                    <div class="layui-input-block">
                        <input type="text" name="qty" lay-verify="required" lay-reqtext="库存数量不能为空" placeholder="请输入库存数量" autocomplete="off" class="layui-input">
                    </div>
                </div>


            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn" type="submit">确认保存</button>
                </div>
            </div>
            </div>
        </form>

        <!--分割线2号-->
        <!--一开始要隐藏这个地方，这里是编辑的区域-->
        <form th:action="@{inventoryEdit}">
            <div class="layui-form layuimini-form" id="inventoryEdit">
                <div class="layui-form-item">
                    <label class="layui-form-label required">ItemId</label>
                    <div class="layui-input-block">
                        <input type="text" name="editItemid" lay-verify="required" lay-reqtext="ItemId" placeholder="请输入ItemId" autocomplete="off" class="layui-input">
                    </div>
                </div>



                <div class="layui-form-item">
                    <label class="layui-form-label required">库存数量</label>
                    <div class="layui-input-block">
                        <input type="text" name="editQty" lay-verify="required" lay-reqtext="库存数量不能为空" placeholder="请输入库存数量" class="layui-input" autocomplete="off">
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn" type="submit">确认保存</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>
